package com.lemon.system.controller;

import com.lemon.core.web.Result;
import com.lemon.system.po.TenantMenuPO;
import com.lemon.system.service.ITenantMenuService;
import com.lemon.system.dto.TenantMenuDTO;

import javax.annotation.Resource;

import com.lemon.system.vo.LeftMenuVO;
import com.lemon.system.vo.RouteVO;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.lemon.mybatisplus.base.BaseController;

import java.util.List;

/**
 * 租户-菜单中间表控制层
 *
 * @author 李猛
 * @since 2024-02-11
 */
@Log4j2
@RestController
@RequestMapping("tenantMenu")
public class TenantMenuController extends BaseController<TenantMenuPO, TenantMenuDTO, ITenantMenuService> {
    @Resource
    private ITenantMenuService iTenantMenuService;

    /**
     * 查询左侧菜单
     *
     * @return
     */
    @GetMapping("getLeftMenu")
    public Result<List<LeftMenuVO>> getLeftMenu() {
        return iTenantMenuService.getLeftMenu();
    }
}